package hotel;

import java.io.IOException;
import java.sql.SQLException;
import java.util.Scanner;

public class ProvaDatabase {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws SQLException 
	 */
	public static void main(String[] args) throws SQLException, IOException {
		Database prova=new Database();
		Scanner s=new Scanner(System.in);
		while(true){
			String st=s.nextLine();
			if(st.contains("select"))
				prova.stampaQuery(st);
			else
				prova.query(st);
		}
	}
}